Fix exit code for travis scripts