Start building out the unittest framework
Do not exit the app from the library (wrong domain).
Replace "print" with logging.log, per dionyziz's rec.
Factor out httplib, replace with urllib
switch back to urllib2 to add headers, correct name format

HTTP header "Host":"namecoin.dns:80" disambiguates which service is
being requested when multiple hosts are served from a single IP address.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html (section 14.23)
Note explicit inclusion of port 80, may or may not be a good idea in
this context (feedback appreciated).

names are now expected to begin with "d/" or "id/"
Remove port number from the Host header
Remove namespace constraints (there's more than 2)!
Header specification now a constructor parameter

The default is: 'namecoin.dns'
Remove unused exception
Add host override to lookup
Remove urlencoding, fix error message
Use logging, per dionyziz's instruction
Remove unused import

Note, this kind of commit will be squashed out of the
branch I actually submit a PR for.
Try an HTTP agnostic error
Leverage logging error reporting for cleaner code.