Fixes #17: clean up python unicode handling
[libcredit.js] Be a little more stringent with UTF-8 (keeping up with python after #17)