Add test for better error message for bad JSON

When we pass invalid JSON we should get a sensible message.

https://www.pivotaltracker.com/story/show/69911234