Fix doctests for py3 and enable in Travis CI

Hacks exception testing in doctests to catch and print exceptions to work around http://bugs.python.org/issue22710.

Also enables doctests on Travis CI, adding a "pytests" job configuration for doctests and eventually for other python tests (#63).