Fixed bug 1321345

When charm urls contained a hyphenated name and a charm version number the package name was not parsed correctly when creating a new model.

#### To QA
- Use the il and mv flags (This bug only presented itself using these flags).
- Search for the `juju-gui`.
- Drag and drop it onto the canvas.
- Click the service icon to open the inspector.
- Close the inspector
- The service token should still read `juju-gui`