Log uncaught exceptions as test case errors.

Fixes #50 and generally improves debugging when reviewing test logs.