Add all unit tests, change reformat exception handling in TermTest
Catching exceptions in a unit test is a bad idea; it makes it harder to
find the problem. This was the first test I wrote I think.