safely/robustly encode to 8bit string as utf8 from unicode
address coding style issues
Merge pull request #6 from daubman/safe_encode

safely/robustly encode to 8bit string as utf8 from unicode