Fix race condition in dequeue
Introduce DirectoryBackedBag