change `echo -n` to `printf` for portability

That’s what the man page for echo recommends. And my testing indicates that they are equivalent.