Improve job completion

Addresses #126

* Switch management of `completion_lock` to a context manager, which guarantees release of lock, even after errors.
* Switch snapshot detection to a warning instead of an exception