[tell] Properly encode unicode before writing db file.

Fix issue #220