changed the output to show the repository name instead of the absolute path

- got rid of a possible trailing slash
- the output shows the repo name instead of an absolute path
- created a new var for the output, since rep is also used for changing into directories