Refine gem5 invocation script with getopts.