def ensure_dir(dirname):
    try:
        os.makedirs(dirname)
    except OSError, e:
        if e.errno != errno.EEXIST:
            raise
Ensure that a named directory exists; if it does not, attempt to create it.
dataset/ETHPy150Open VisTrails/VisTrails/scripts/dist/windows/update_alps.py/ensure_dir