Fix strip endline when file is encoded as dos.