Improve style of test runner

Added braces around an if, and just error instead of storing an error message that is potentially overwritten with another.  Also some indentation fixes for good measure.