Don't segfault on invalid utf8 while sorting

`strmblen` returns -1 on invalid sequences, which causes a segfault when passed as length to `stpncpy`.
Merge pull request #49 from mheijkoop/unicode-sort-segfault

Don't segfault on invalid utf8 while sorting