Added isLocal() method to Storage to find out whether the storage is
local or not.
This method is used for the x-sendfile logic to find out whether to add
the headers.
When calling fopen() on some storage types, these return false instead
of throwing an exception.
This fix makes sure that in case the stream wasn't opened (for example
when a file doesn't exist any more) the stream isn't wrapped.
Also added 'rb' as another case that doesn't need to be wrapped.
Fixes#6832