Keep duplicate github remotes from being added to component.json

My pull request #387 was causing the default GitHub remote to be added to `component.json`; causing duplicates with multiple calls to `component install`. This is because before my pull request `saveConfig` was called before the default remote as was added. Also as far as I can tell, since we're using `end` event for each package to write the file, the `forEach` loop is unneeded now. `pkg.version` gets set to `master` so there is check performed to change it to `*` I added commits to fix both of these problems and I read the file over to make sure it wasn't breaking anything else. As far as I can tell everything is right now.