Support for fetching remote repositories, fixes #330