Fixed detection of git branch.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>