Fix bad handling of repository name

The strings.TrimRight() function actually removes characters contained
in the second argument from the first one, resulting in removing needed
characters from repositories which name ends with 'g', 'i', or 't' (a
dot '.' is impossible by construction). The correction function that
removes a subtring at the end of a string is strings.TrimSuffix().
Merge pull request #158 from jbbarth/bugfix/wrong-repo-name-returned

Fix bad handling of repository name