storage: More correctly put unoriginals into cache folder

And look up case differences in extensions.