Saving the cached file with extension

Without an extension TiBlob doesn't know what kind of file is and for images
we cannot access width/height
better extension detection
Merge pull request #5 from rborn/master

Add extension to cached files