Updated shell module to save DAG when it marks a shell process as
running.