imap-send: correctly report errors reading from stdin