JPEG selection based on file header

Using the file extension to detect jpeg images for exif extraction is not sufficient. An example where this fails is jpegs in iOS backups where all filenames are hashed with sha-1.

Apache Tika is able to detect jpeg files based on the 4 first bytes. Though you have to create two input streams for each jpeg, it ought to be worth it.