Fixed serialization of non-PHPUnit exceptions.

Any exception thrown during a test run gets converted into a ExceptionWrapper, in order to make it serializable.
Cleaned up regression test.