test: fix test-cwd-and-chdir

For background info, see https://github.com/libuv/libuv/issues/53.

R=@saghul
R=@bnoordhuis