Fixes issue #3122 of filenames being taken as URL

I have added more checks to verify that given fileobj is an url by checking the scheme. The scheme is returned by urllib.parse.urlparse(urlfile).scheme - which contains the protocol for urlfile. For a valid URL, the scheme could be HTTP, HTTPS or FTP, hence anything else returned apart from this should not be treated as URL and should be treated as File.
On further thought, it's still possible that the file could not be found, but then there would be an exception here when trying to open it as though it were a URL (resulting in the "unknown protocol" exception).  That exception should probably be caught and handled regardless.

It's just a shame urllib doesn't provide a way to check what protocols will be handled by the default opener.  It very well *could*, but as is widely acknowledged these days urllib is a bit outdated and crufty :(

Anyways, I still think you can find a way to reorder this code slightly so that it can open files with ':' in the name without making any assumptions about supported url schemes.  Thanks again--the rest of the PR looks good!