Setting the working directory before git operations