Extended build script to support branch and pull request builds on teamcity