Fix #163: Move logic of git infos extraction to lib