Enable "doctest" Sphinx module
Thanks to Bernard Giannetti, fixed example scripts

Also, I have gone ahead and made the example scripts executable using
Sphinx's new "testcode" and "testoutput" directives, and included their
output inline so that I can be sure that they keep working.