Use Puppet::Util::Execution.execute in openldap_password function

Also, add unit tests for the function and fix condition on error raising.