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.
Is this first condition even needed since the second one (that it is ``http``, ``https``, or ``ftp``) is much more strict?