travis build, bug fixes

Nitpicking: I'd prefer Ruby code instead `grep`, `sed` and `tr` chain. If the output is not huge (which is not in this case I guess) it should be more effective.