Fixing bug with bitbucket

On certain merges bitbucket sends an empty "branches" array attribute 
with each commit node. This was tripping up the hook and grabbing a 
null branch name.