stash: revert on save in reverse order to handle nested added directories
stash: remove added directories when stashing if they are empty