Path construction fixes, better debug when LDAP is not configured,
misc fixes.