Fix tests fail using nose. Fix coveralls coverage reporting.