Add colour support and log functions.

The colouring is nice for people with shells that support it and will
give them a better idea of which messages they should pay attention to
and which are more meant as informative.

The log functions additionally add a 'loglevel' indicating the severity
of the message and the timestamp when this message was logged. The time
isn't strictly necessary but it's a common thing to do when logging
messages and will give people a sense of the elapsed time, if any.
Merge pull request #1 from daenney/color-logging

Add colour support and log functions.