CB-6322 Simplify platforms/platform code for platform specifics

github: close #146
CB-6377 Handle spaces in paths for cmd related scripts