outputs/s3.rb: format should be in charge of new lines, not the writing itself

When outputting JSON, there would be 2 an extra new line in the output. I added the newline to the format_message method and removed it from when we write to the local temp buffer.