appliance: use the right way to get git branch name

Taken from Junio C Hamano's blog [1], git's maintainer, he must not be wrong :)

[1] http://git-blame.blogspot.ch/2013/06/checking-current-branch-programatically.html

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>