Rakefile bugfixes

Here are a few improvements to the Rakefile:

- Improve validation of the framework path argument to `rake upgrade` and report better errors when it is used incorrectly [#64936304]
- Improve cleanup of existing templates when installing, to make sure obsolete/renamed ones don't linger [#64936380]
- On the other hand, don't remove templates that are determined to not belong to Cedar. This is determined  by looking for a `isCedarTemplate => "true"` entry in the template's plist (snippets are already handled this way). For now, it is also looking for an `Identifier` entry that begins with `com.pivotallabs.cedar` to handle upgrades from templates that don't yet have the new key. Eventually this latter case can probably be removed. [#68661790]