If the tailed file has dos line endings, they are not trimmed properly.
Given the following input file:
line number 1
line number 2
If the file has dos line endings the "%q\n" formatted lines are:
"line number 1\r"
"line number 2\r"
I am expecting the same lines as if it had unix line endings:
"line number 1"
"line number 2"