Fixed issue #818.

Fixes the test for broken pipes in containers like Tomcat that wrap the original exception.