If the argument to `remove_directory` is a symlink to a directory, remove the symlink instead. Issue: #19533