Fix pylint errors and warnings

* Fixes pylint errors and warnings except for missing or empty
  docstrings. (closes #3)

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
Documentation

* Adds missing documentation.

* Fixes issue in Tox, causing Sphinx doctest to always report
  success when tests failed.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>