Use tput to generate color codes

This allows "echo", among other commands, to use these sequences under OS X (where echo doesn't support the `-e` flag).