Move chdir to repo init