Fix broken unit tests

These tests were broken by #571. Unfortunately, this was not detected by
Travis due to a bug in the test runner.
Make sure test runner returns correct exit code

Now that we are directly running tests via a unittest.TestRunner, we
need to make sure to check the return values and set a corresponding
return code for the test runner script. Otherwise, Travis will not
detect that a test failed and will incorrectly say that all tests are
passing.