Fix autosave behavior
Some changes that shouldnt be here
Merge pull request #2628 from ajaxorg/autosave_trashes_file

Autosave trashes file