Make compilable on Cygwin
Fix default directory at "Open a file" dialog on Cygwin
Merge pull request #1028 from MihailJP/cygwinfix

Make compilable on Cygwin