Fixed issues with bad Cygwin conditions on non-windows system

Sorry for mistakes in my last pullrequest, some of them I didn't realized until someone else tried it.
Two fixes here:
- fixed from if conditions for cygwin case  (throwing unnecessary errors for linux/osx user)
- added explicit creation on /tmp dir on windows system (because it is not standard)