properly determine url to download package from