Tools: getopt and icon replacing fix in icon replacing tool

subj