Hard error on JSON truncation
Fix testall always succeeding, even when there are failed tests.

We trap EXIT, so make sure we keep the return code.
Merge pull request #2011 from worr/bug/json-truncation

Hard error on JSON truncation