new db: Purge directory->path.

Not tested at all. But it compiles.

Also some (two) of the symlink loop detections is temporary removed till
I found a better solution.