Exit 1 if errors or failures from tests

* Catch TestResults from TestRunner and exit with non-zero status if any failures or errors.
* Move clean code to clean function to ensure cleaning the environment on failures.
* Better output.