Detect if the storage directory hasn't changed after saving a document

And don't delete/move/recreate any files in that case.

Fixes #135