Fix line reading format for Windows/Mac/Linux terminators