Fixes #10: newlines are properly escaped