Making log functions unicode safe for unknown input.

Issue #11