Factor using Repository#path_to_repo

Function already existed, we only need to use it.