make clear that functions expect unicode text as input.
Merge pull request #140 from xrotwang/fixunicode

make clear that functions expect unicode text as input.
Merge pull request #142 from xrotwang/logging

Refactored prints into logging calls and file access to use shared utility functions