Use appropriate api url for github.com. Fixes #3

Use a simple regex to guess whether the repo is on github.com or an enterprise github instance.

To: @jkingdon