Catch (and ignore) SIGPIPE; working on issue #3 and #4