Fix lookup of user and repo.

Now handles the following URLs:

  https://github.com/<user>/<repo>
  https://github.com/<user>/<repo>/git
  git://github.com/<user>/<repo>.git
  git@github.com:<user>/<repo>.git