Changed repo_name logic for bare repos

We use a central hook that we symlink to everywhere and were seeing pushes that said "Commit on gitlab-shell (master)", '/gitlab-shell/hooks' being where the hook is stored. I've changed the logic so it can deal with these symlinks and it will also not care if you run the hook from '/repo' or '/repo/hooks'.
Merge pull request #97 from Joeasaurus/master

Changed repo_name logic for bare repos