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

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