Added test suite

Also split out the simple json parser from grab.py to support
the test suite.