patch 8.1.2278: using "cd" with "exe" may fail

Problem:    Using "cd" with "exe" may fail.
Solution:   Use chdir() instead.
diff --git a/src/testdir/test_getcwd.vim b/src/testdir/test_getcwd.vim
index b1470d7..e87f693 100644
--- a/src/testdir/test_getcwd.vim
+++ b/src/testdir/test_getcwd.vim
@@ -46,7 +46,7 @@
 let g:cwd=getcwd()
 function TearDown()
   q
-  exec "cd " . g:cwd
+  call chdir(g:cwd)
   call delete("Xtopdir", "rf")
 endfunction