some fixes

* don't overwrite record.msg as the record may be passed to other handlers too
* Python 3 doesn't have` unicode() `