Update branch.py to build link from env

I want to test this locally, with links back to localhost.