sandbox: add getopt support