Fixed bug about returning escaped DN from server. Updated tests.