remove trailing space/newlines from text

srt output should only have 2 newlines at the end.
remove any whitespace since many subtitles have
2 newlines already.