Preserve suffix of files put in the cache

This is a proposal for fixing #202.