Added functionality to auto-delete empty subdirectories