Don't assume utf-8.

`name` is not necessarily utf-8, so exception could happen, if `getpinyin` is called blindly, so is `path`.