Removed compiler warnings about catch not being in Preface.
Test suite:  return non-zero error code if tests fail.

Also cleaned up and made it .hs rather than .lhs.

Addresses part of #16.