Redmine #1884, #5873: Read module output in text mode on Windows.

Module output is always text, and without this we will get illegal
characters in the module protocol parsing.

There are more tests to fix in the Windows area than I have included
here, but this will have to do for now.
Merge pull request #1729 from kacfengine/module_text_mode

Redmine #1884, #5873: Read module output in text mode on Windows.