"echo -e" doesn't work consistently on MacOSX, so use printf on both MacOSX and Linux instead.