Now, a msbdir can be passed in externally, which is
useful in case Visual Studio is installed in an atypical location.
Also had to make use of Delayed Expansion for the set commands
within the conditional statements; otherwise, they would not resolve
their values properly. Not sure if this is specific to different
versions of Windows or Command prompt, but it bit me.
https://stackoverflow.com/questions/10558316/example-of-delayed-expansion-in-batch-file
This change could easily be moved to the other platforms if needed.