CA-140596: [UnitTest] Test file not found in Lock

These are test cases covering the lock module, and also testing what
happens if file() raises an IOError. This can happen as a race
condition, if two locks - A and B are created in the same namespace and
by the time A gets to open the lockfile, B already cleaned up the
namespace.

Signed-off-by: Mate Lakat <mate.lakat@citrix.com>
CA-140596: Fix file creation error

If creating the lockfile failed with IOError having ENOENT error code,
that means that another lock within the same namespace already cleaned
up the namespace. With this change, should IOError happen with ENOENT,
the lock will re-create the namespace, and the file 10 times, and only
bubble up the exception if it failed all those retries.

Signed-off-by: Mate Lakat <mate.lakat@citrix.com>