Make sprite-file() return a relative path suitable for passing to image-url().

Closes #951.