made slugs unicode-safe

This should fix #36. I wrote it mostly like mozilla's implementation.

PS: the like at the end of my commit has no sense, I just forgot it there.
So, I'd forgotten `char` or confused it with `character`. You've got a good point, let's keep it instead of `aref`.