Make sure that e-mail exports are not overwritten.

If we export more than one image we add the sequence number after
the basename.

For #9722.