tdiary: use Tempfile, and colorize outputs