making undo and backup use dirs