Bug fixing: printing unicodes to stdout crashed on Windows. First patch
Second version to avoid problems writing unicode to console in Windows
Changing tests to work also on Windows