Remove empty lines from the end of the file.