nir/spirv: add some error checking to open()