Added support for different url schemes (mainly to allow 'https' to be specified).