put autosave in temp dir
delete trailing whitespace, load snippets, put autosaves in temp dir