Add support for build pack branches

This is a redo of the previous pull request #51