add API access for DAG submission
Also simplify the API for writing DAGs to disk, using the dag.write() method which folds in both write_dag() and write_script().
Also simplify the API for writing DAGs to disk, using the dag.write() method which folds in both write_dag() and write_script().