Basic repo path discovery.
More comprehensive url handling.