Use printf instead of echo in Travis build scripts and rework diff printing