Add travis config and modify tests so they work on travis.