Switch to the correct working directory