Use the ./configure --debug flag to determine the build target.

add file open modes for options JSON file and make the filename variable name more descriptive
Merge pull request #342 from rjemanuele/windows-installer

Use the ./configure --debug flag to determine the build target for Windows