Added support for commandline arguments.  Arguments are currently [filename], [-g/-a], and [-r [number]].