def mkdir_p(path):
    try:
        os.makedirs(path)
    except OSError as exc:  # Python >2.5
        if exc.errno != errno.EEXIST or not os.path.isdir(path):
            raise
Borrowed from: http://stackoverflow.com/a/600612/386925
dataset/ETHPy150Open winhamwr/neckbeard/neckbeard/configuration.py/mkdir_p