Sets APP_DIR correctly when installing on Cygwin

Changes the order of env_var lookup to select the *NIX version when both are available.
Merge pull request #130 from seagoj/cygwin_install

Sets APP_DIR correctly when installing on Cygwin