Fix WriteHTMLForTracesToFile

Turn out my last fix doesn't actually work. Somehow able to get a window machine to test this fix. Also clean up compressed_file logic which I believe is unnecessary.
To test this change on Windows, run:
python run_tests trace2html
There is nothing wrong with compressing it. But method used here which is opening a gzip tempfile, then use shutil.copyfileobj to copy over the data to that tempfile seems wrong to me. If we really want to use gzip for some compatibility reason, uses StringIO as a temporary holder with be a better choice.