delete trailing whitespace before saving.