Fixed an AES memory freeing bug and added PBKDF2 error checking.