remove trailing space/newlines from text

remove any trailing white space from text
before formating as srt. many subtitles
have trailing newlines resulting in an
srt with more than 2 newlines otherwise.