nose: tests and fixes for doctests and docstrings