Fix: ensure git is always run from the project directory

When trying to obtain the version hash
Windows + CPack: fix packaging

Package the correct cpack’s temporary directory
Merge pull request #209 from ctrlaltca/cpack_win_fixes

Cpack fixes for windows (fixes #207)