fix temp image file name

The former version was not removing the created files