Fix imread from urls on some backends

Some backends infer the image type from the extension. This fix just adds the extension to the temp filename.