Use filename as filename when exporting, and as title of exported HTML page.

This change uses the actual filename, trimmed for neatness, as the default filename when exporting, rather than generating a random filename. It also uses the filename as the title of the exported HTML page, rather than just saying 'Exported HTML'. Show HTML now also displays the filename.

I also added .swp files to .gitignore, as it kept trying to commit them.