Check returned passwords

Fix for versions where $2y$ is not available, but CRYPT_BLOWFISH is.

Now also checks the return values, and throws an exception if everything
fails.