Mkdir to fail when a parent dir is a file, but otherwise only go up the tree as far as needed for efficient (deep) writes