BUG FIX: fixed hash type detection regexp

UserPassword.valid? treats passwords with lower case hash type ({crypt}.....) as plaintext password. This pull request contains a fix for that.