Cordova 3.0 changes and Encode object access fix

I hope I've finally managed to do this correctly. Changes to pull are those since Jul 24, 2013.

Should fix issues: #29, #31, #32, #33 (most are the same issue really).