Make sure image names only contain US-ASCII characters

On certain server setups, we were getting errors from filenames
that were generated from unicode names, so try to remove any
accents and ignore any non-ASCII characters before using it for
the image name.