Oh, can I chime in too?
If the image has been rotated, and you transfer the EXIF data using something like
exiftool -TagsFromFile src.raw out.jpg
Then the orientation will be wrong (and you’ll see this in Flickr for instance).
To fix this, you can explicitly set the Orientation flag after you’ve transferred the other exif data:
exiftool -Orientation=Normal out.jpg
If the embedded thumbnail doesn’t match your actual image and you want to remove it (or just want to save the few extra bits:
exiftool -ifd1:all= out.jpg
will strip the thumbnail info out of your EXIF data.