Add exists_ok to mkdir
Cherry picked results from !905 (merged):
- Add the exist_ok=True flag to mkdirs resolving errors caused when the directory is created before it is written (common on large-scale HTC runs).
Cherry picked results from !905 (merged):