Improved DirectoryStore.Optimise()