fix create_thumbnail saving for images not requiring resize

In case the size of the thumbnail that is about to be created matches the size of the original image, so resize is not needed, the thumbnail was incorrectly saved, it's content was not the actual image data, but the path of the file.