Update checkstream.sh

Partial rewrite, does a few of the checks before looking up the API which shouldn't waste as much time. Anything before the API lookup is strictly to do with local things, and everything after is to do with the stream status and to load it up, etc. Also, not as much nesting.