Avoid SIGPIPE on mac and linux.

A SIGPIPE most often just crashes the user's app, which is no good.