Cordova-CLI 3.0 essential fixes

@bobeast Here is the new pull request with only the Cordova 3.0 fixes. Thanks!