Using `printf` in place of `echo` in several places.