fixup std::min usage with strings, when saving images

I think this should fix the error reported by Pentarctagon here,
at the very end of his log.

http://forums.wesnoth.org/viewtopic.php?f=4&t=41018&start=15#p577053
Merge branch 'master' of https://github.com/wesnoth/wesnoth