fix algorithm parsing, and new exception handling

* new exception handling when the dns is unavailable.
* fix tsig algorithm parsing (really case insensitive now)