Add support for Windows line endings in cnd

The finalized version of @dinamic fix for issue #48. PHPUnit tests passed.