Revamped the plugin to support Cordova 3.0+

The functionality is all the same, but I updated it to work with Cordova 3.0+. This also means it's compatible with plugman now.