Fix running tests with nosetest
Fix segfault with tests
Add missed deps
Add travis config