Unit testing improvements

This lets unit tests run through even after some tests have failed, plus it gives more informative error messages; particularly when forwarding to the error console, where stack traces are available for all failures.