dist: use 'printf' instead of 'echo' to make shell scripts work in MacOS X

The "-n" option and escape sequences are non-POSIX extensions in GNU echo
that are not available in the BSD echo in MacOS X.

To make these scripts work in MacOS X, it is necessary to use "printf" instead
of "echo".