Fix issue where non-windows OS terminals don't paste newlines correctly
into misbehaving programs. As noted in JetBrains/jediterm#136, the
most practical solution is for terminals to handle this in their paste
logic. In a perfect world, all terminal programs would implement
bracketed paste mode properly, but that's a lot to ask.
- translate newlines to \r which is what terminal programs expect