Fixed issues with mkdir()