Fixed line terminators to handle LS/PS and CR+LF correctly.