Check result of storage wrappers

Currently if a storage wrapper doesn't return a storage object it will break the filesystem, this adds a simple check to verify that the returned value is indeed a storage.

Possibly related to owncloud/documents#283

cc @DeepDiver1975 @karlitschek 
Should you not return some sort of exception or log if this condition fails?