def makedirs(name, mode=None, exist_ok=False):
    """Forward ports `exist_ok` flag for Py2 makedirs. Retains mode defaults"""
    from os import makedirs
    mode = mode if mode is not None else 511
    makedirs(name, mode, exist_ok)
