Split argument parsing into smaller functions to be leveraged by west twister extension. Signed-off-by: Al Semjonovs <asemjonovs@google.com>