Fix dirpersist plugin

This plugin did not work, I just found the same functionnality in grml, this one works.
Merge pull request #2631 from AntoineD/master

Fix dirpersist plugin