Issue #357: use printf instead of echo sprintf

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