Parse arg refactoring #4124

Extracted platform specific argument parsing code.
Parse arg refactoring #4124

Implemented argParser class.
Parse arg refactoring #4124

Added unit testing
Parse arg refactoring #4124

Used argParser to parse arguments and removed the old code