Test coverage for the most important exceptions.

This pull-request contains tests for the most import exceptions.
Using those tests should make it easy to improve error handling.

This pull-request stops the integration tests from writing to stdout.
Which means we will now only see the output from the test results.