Better error messages for unit tests

Previously it always said "syntax error", even when there was some
other kind of exception thrown, or the test file simply returned a
false value.

Now those two cases are distinguished, and in case of an actual syntax
error, the string "syntax error" is already in $@