making the custom command env variables test harness cross-platform

Switching VS10 custom command env to use cmake -E env

Switching VS10 custom command env to use cmake -E env
merge
Adding proper escaping to custom command environment variable manipulation for UNIX Makefiles