Added temporary directory change for _is_in_git_repository().