renamed _WIN32 to _MSC_VER, fixed a bug in file type detection logic, changed cls behaviour on win32