Clean up image locations

The current PDF version is already produced with these changes. It basically cleans up the image
locations and also removes duplicates or unnecessary formats.

Please also have a look at
 * b2a20c4 in particular as this fixes a reference to a non-existing file.
 * 6d4b274 You might want to add even more/better keywords here.