modified function to use user preferred repo first before default.
Merge pull request #4 from karthikram/master

Nice. Thanks for adding that.