Generate complete html files

WIP. Works best in Chrome. @joshua-s how do you normally debug in Firefox? `console.log()`s don't show up for me because of something similar to https://bugzil.la/1047646.

This isn't the approach from https://github.com/codexa/firetext/issues/245#issuecomment-65721543, because I'd already started then, sorry about that.

Proper diff: https://github.com/codexa/firetext/pull/246/files?w=1
I moved it to its own file. Not sure why this does work though.