Script now fails on chdir fail