fixing mkdir code to respect external file systems as well