handle carriage return in strip_newline, closes #126