Bugfix in the code for exporting in the BDN format

When generating names for the PNG files an extension was removed twice from the name of the XML file, so the names of the PNG files were not as expected if the name of the XML file had multiple extensions.