Logging

Hi Alec,
 -  Finally got my shoes untied and this time I thik I've done it "right-er" (i.e. on a new branch).
 -  Added logging functions for text and executable commands (impact of each logging action is smaller and simpler).
 -  The icon on the right of the pull-request implies this should merge cleanly this time (fingers crossed).

Cheers,
   Ben.