Support loading of files with wrong extension

Like M15’s .png that cockatrice wrongly saved as .jpg
Additionally, move the QImageReader declaration outside of the inner loop