Directories bugs fixed

Directories bugs on Windows fixed