PM-1034: Add some checkpoints to pegasus-submitdir
PM-1034: Add some checkpoints to pegasus-submitdir

This change does two things to pegasus-submitdir archive:

1. It uses a temporary file for the archive so that we know whether the
archive is complete. If the temp file exists, then we remove it and create
a new one from scratch. If the final archive file exists, then we don't try
and create a new one.

2. It uses a 'lock' file so that we know when the remove step is complete.
If the lock file exists, then we assume the remove step did not complete.

Together, these additions will make it more difficult for users to break the
archive process.

pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus