A bit of tweaking to listBranches.groovy