Use getopts for commandline argument parsing.
Updated readme with new argument syntax.