Changed name of doc to open_doc
Rewrote to be testable
Added method to choose stable or devel, with default to look at version
Added tests
Added compatibility code for Python2/3 urlencode