Caching image downloads. Now checking the Content-Type for the actual mime type information if present. Falls back to extension otherwise.