Adding proper shell detection for Cygwin.
Merge pull request #2781 from orderthruchaos/master

Adding proper shell detection for Cygwin.