Add some validation and return proper exit status

- validates existence of GITHUB_TOKEN environment variable
- checks the http status code of the GitHub API request and
  returns a proper exit status code