Made a couple of small fixes so key images are now generated.

These are also now placed in the folder where the XML file is located.