Improved error handling
Merge pull request #356 from stefk/test-errors

Improved test suite error handling