Visual Studio 2010 build script.

more environment variables for easier customization.
fix usage of access()

those were the wrong constants.