Fix encoding of beacon requests

Previously `_rex_('#')` would break it
Merge pull request #9 from rjmunro/feature/fix-beacon-encoding

Fix encoding of beacon requests