Fix state creation, and clean up output logging.
Tidy up the command-line recipe running output logging.
Ignore tmp directory.