Replace GOptionContext with a command-line parser that does not mangle character encodings.  Closes: #392.