Ref T2015. Windows machines won't delete directories if there's currently any process running inside them. Thus since "rm .." is run inside the current lease directory, the removal always fails.
This unsets the lease's path before attempting to remove it, so that it will be removed correctly (providing there are no other processes using it still).