Remove trailing whitespace when saving a file