Remove empty characters from the end of files.