rename _WIN32 to _MSC_VER, fixed file type detection logic, changed cls
behaviour on win32