Escape non-ascii bytes in tracebacks line-by-line instead of all at once.

Previously if there were any bytes that needed escaping, the newlines
would get escaped as well, ruining the message formatting.

Closes #675 (again)