Wraps file locks as an object, unlocks upon destruction.