Add travis yml and fix action hook scripts.

The idea to to make the action hook script both work on production
and on the CI.