Properly encode topic names

- fixes #5