Fix race condition pertaining to nil in DistributedLock

I wasn't checking if `@redis.get(@key)` returned a non-nil value, and `nil.to_i` is 0 which caused the following test to always succeed.