Fix nosetests (works with travis)

Done some refactoring, cleaning and fixing of doctests.
I will register the main pyhrf repo with travis to have commits automatically checked