Issue #357: use printf instead of echo sprintf

Replaced instances of `echo sprintf` with `printf` for the sake of simplicity and brevity.