Proper cleanup of directories.