Fix for ticket:2981: Bitbucket hook doesn't work when specifying project

I basically just copied the fix from the ``github.py`` web hook dialect.