Avoid extraneous newlines in test runner output

This implementation is fairly hokey, but it gets the job done: prevents doubling up on newlines to make test output look nicer.