Add Travis test script and build status icon
Fix some tests