make chdir work