Improve domain to baseDN conversion

Thanks to roelpaesen for catching problems with this: https://github.com/kbanman/laravel-ldapauth/issues/3