Fixes for the ISO xml metadata

Fix use of xml library 2.7 routines, we want to stick to 2.6 compatibility
Initialize the number of gaps to 0, so avoid crash if no gaps found
Change naming convention for output jpgs