Reimplement parseopt which parses arguments given as a sequence of strings, not single string.