Fixes and cleanups for local assets

Comment from 261540d98c3aaebedb8f0f8caea4f344ee98d932

While reviewing, I found a possible bug.

StringIO(file.content) should only be called if we got a valid status.
also file_to_open is a bit confusing since it can be path if it is a local file,
while it is a IO stream from fetched content if remote.

Right now resolution is not used, so simplest solution will be to clean out all those references?

Also wondering if it would be better to use uri_check.scheme=="FILE" if possible to be sure it is a file?