improve find_repo, store repo's root dir
handle paths more correctly