Creates timestamped directory for output and redirects stdout/stderr to logfile.