TIMOB-18133 CLI: Build - Cannot build a project from CLI if you specify the Titanium project directory

Porting the code from 3_5_X branch to master.