Fixed #191, #182, #83: DiskStore concurrency issue

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