Add support for DAGMan 8.1.6 node status syntax.
Stageout failed files to an alternate directory.

This will prevent race conditions in ASO from overwriting a
successful job's output with that from a failed job.
Record job exit code and site name in the case of an exception being thrown.
Move function call to convert to JSON.
Fix parsing of ID.