def ensure_dir(*args):
    'Make sure directory exists.\n\n    Joins the list of arguments to an os-specific path to the desired\n    directory and creates it, if it not exists yet.\n    '
    dirname = op.join(*args)
    if (not exists(dirname)):
        os.makedirs(dirname)
    return dirname
Make sure directory exists.

Joins the list of arguments to an os-specific path to the desired
directory and creates it, if it not exists yet.
def ensure_dir(*args):
    'Make sure directory exists.\n\n    Joins the list of arguments to an os-specific path to the desired\n    directory and creates it, if it not exists yet.\n    '
    dirname = op.join(*args)
    if (not exists(dirname)):
        os.makedirs(dirname)
    return dirname