Simplify dn= query logic.

Found out about entryDN: in ldap search filters. Much simpler.