More python 3 compatibility.
Attempt to find job_manager module from the default source layout.
Make a number of attempts (default 30) to acquire the lock.

This is makes it possible to run several operations in parallel (e.g.
several calculations starting at the same time on a cluster).
Fix typo in usage message.