Fixes for the environment variable feature.

It is impossible to set an environment variable such that the calling
command prompt can see the value. Instead it is only possible to change
a User or Machine environment variable.  Of the two, the Machine
environment seems like the wrong place, so the application sets a User
environment variable. At least this makes it possible to update a
version number in one batch invocation and pick up the value in NEW
command prompts.