Working on local storage in PhoneGap