Add a function for argument parsing

Signed-off-by: John Else <john.else@citrix.com>