Fixes for Windows OS

Some fixes concerning Windows OS.

On Windows new line is `\r\n`.