Fix unicode support for dictionary.py

`.define` and `.e` will throw errors when there are either definitions containing non-ascii characters, or it couldn't find input with a non-ascii character in it. This patch fixes that.