getcwd: fix test failures on mingw