Write an HTML string to a file.

def write_file(self, html, outfile):
        """Write an HTML string to a file.
        """
        try:
            with open(outfile, 'wt') as file:
                file.write(html)
        except (IOError, OSError) as e:
            err_exit('Error writing %s: %s' % (outfile, e.strerror or e))