Fixed some tests and bugs in the test runner.