travis: refactor script, try to fix utf8 check program