Fix for number of bytes copied in encode_exif()

Currently the number of bytes copied is equal to the number of elements in the exifdirs vector (and likewise for gpsdirs), instead of number of elements * sizeof(element). This should fix that!