Fixing installation the installation error on windows.

This should address issue #163. It has been tested on Windows 8 and Mac OS X. Essentially using javascript for the file check versus the more terse command line version.