fix issue #933 and Windows like line ends (CRLF)

Fixxes issue #993 when merged and addionaly Lineends to windows like ends(CRLF)