Update to Cordova 2.7

Hi, I updated the code in order to work with the latest Cordova version.

Also, this is my first pull request, don't hesitate to tell me if I'm not doing things right.

Thanks