Add key flag for API key

Also move key check before the cache check, since if the cache is not stale, the user has a false sense that it's working, but it will stop working when the cache expires
Merge pull request #7 from justincampbell/key-flag

Add key flag for API key