Suggestion:
I moved most of the Process.runSync() to runCommandSync() to make command line calls more readable.
```
Process.runSync('rm', ['-rf', 'app/sdk/lib']);
```
would look like:
```
runCommandSync(context, 'rm -rf app/sdk/lib');
```