Unbreak chdir on Win32

This reverts commit 2b57f3f48812528280e6d7371517083712ff69f1.