Fixed bugs around branch names and tags

- Fixed a bug where URL encoded branches were not being filtered correctly
- Changed the check for x.x/release branches to simply x.x/ so we can pickup all branches
- Defaulting to trunk if the MAIN_REPO (unity_branch) is found in the branches (Nasty hack but necessary for now)