if not os.path.isdir(os.path.dirname(dumpfile)):
        os.makedirs(os.path.dirname(dumpfile))