Fixes #29 and adds trim trailingwhitespace on save setting, toggleable via a command