changed cwd method for leaving git repo