A few overlapping script fixes

See individual commits for details
- highlights are fixes for #876 and #887 as well as support for packing .exe files
`GetScriptVariable` should not be shared among all build script blocks. Variables of configurations and target frameworks shouldn't been exposed to `postbuild`or `prebuild`.