getopt(3) for Scala