fixed chdir block for windows