Handle EPIPE errors during tests when remote end closes connection

Closes #178

Some tests will induce behavior that causes the remote end to close
the connection before all of the data has been written.  With small
kernel buffer sizes, this can cause an EPIPE error.  Since the test
expects an early close, this can be ignored.