Bugfix: directory renames were not propagated

Contributes to fixing #2551