Idempotent, transactional runs of external command line programs