fcntl.flock will block indefinitely if another process holds an exclusive
lock. A non-blocking flock operation will raise an error when a lock already
exists so we can fail immediately.
Closes-bug: 1315507
Change-Id: Icf97b1f8643157719b3d28ac2c0c1576a5069697