Improve how version is got from git

Change-Id: Ie547ede41c16390fb47b447fc64f9add936831e5