Devised a workaround for doctest failure.

The doctest module does not load files ending in .so as python modules,
but rather tries to read them as if they are text files (like a README).
This works on Python2, but created UnicodeDecodeErrors on Python3.  To
work around this, a script has been added that will copy the std lib
doctest module to the local directory, but in the process modify the
file such that it will try to load .so files as a module, and also so
it can recognize C-extension functions.