Convert most doctests into unit tests

Fixes issue #14. This also gets rid of some tests that suffer from
indeterministic dictionary outputs.
Make string formatting compatible with Python 2.6

In Python 2.6 the new format string specification did not allow empty
positional arguments, e.g. "Vector{}". Thus this needed to be specified
explicitly.
Fix some 2.x vs 3.x issues

ConfigParser -> configparser, imap -> map
Merge branch 'fix/tests_2.x' into fix/python_3.x

This merge is necessary for regression testing. Since introducing Python 3.x
compatibility could potentially break functionality on Python 2.x it is
important to integrate this branch, which fixes tests on 2.x, into the 3.x
branch.