Use printf instead of 'echo -n' because OS X uses the anemic BSD echo.