Add support for building ganeti using a git branch

This basically assumes none of the git tags or branches start with a number.

NOTE: This is still a work in progress. Pandoc still fails when trying to build
the man pages.