Add parse_args() routine

Signed-off-by: Ilya Nelkenbaum <ilya@nelkenbaum.com>