Properly handle broken input in standard_error

io:put_chars(standard_error, [oops]) could previously crash the
standard_error process.

Reported-by: Alexei Sholik