Use printf rather than echo in bin/agavi, closes #1102