Build & deployment improvements

First attempt at support for deploying branches other than master
Build & deployment improvements

Added checking if deployment is needed to pre_receive too