bug fix from core and sync (to core) for version handling

* git version info extraction was buggy
* minor changes introduced in core were ported

Change-Id: I0a82d5c2139fdcbe27be64a39f0647e6be9be700
Merge "bug fix from core and sync (to core) for version handling"