Parse repositories with paths

Some repositories can have paths in them (such as [wp-cli](https://github.com/wp-cli/wp-cli), which uses "wp-cli.github.com/pear" as the repository). At the moment, the code will only parse the domain as the repository, whereas it needs to use everything up until the final slash.

The attached patch switches from using regex to using rpartition instead.