Trim trailing whitespace from lines.