Prevent deletion/renaming of targets with dependencies.

Perhaps in the future we could add an option to let `rename` also rename
the dependencies, but this will do for now.