Encode passwords UTF-8 before attempting to hash them.

This ensures that non-ASCII passwords won't break stuff (yay)
Merge pull request #107 from Rosuav/encode_passwords

Encode passwords UTF-8 before attempting to hash them.