Added detailed error messages

A case statement has been added which will deliver specific error
messages based on the error code returned by ldapsearch. This provides
valuable feedback to the user.