Fix DiskStore concurrency issue.

DiskStore.__setitem__ is not atomary and a host of errors can be thrown under
load. This method has been made threadsafe.

This fixes #191, #182, #83