Trim trailing whitespace when a file is saved