Minor fixes to mkdir()