Fix rename_subdir to use not target, but the basename stripped of file extensions of @path.