core_import_popolo: check for errors when fetching images

If we get a 404, for example, we definitely shouldn't be storing
the 404 page as an image.