Fix working directory problem on windows
Implement posix platform