The only concern that I would have about this is that the size of `rm_stack` is `O(directories)` whereas it should probably be `O(deepest directory tree)`. This isn't hugely concerning I think, but it would be nice to remove a directory promptly after all its children had been deleted.