You sound like you are on the right track. Just make sure you are using the right documentation for the version of phonegap you are using. The one you linked above is for version 1.0...
First, you want to use the local storage API, not the file API. Assuming you are using Phonegap Build 3.0 you can find the documentation here.
Next, every time your index.html page loads, you want to check the local storage to see if they have agreed to your terms and what version of the apps terms they agreed to.
tx.executeSql('Select agreedBool FROM termsTable WHERE version = "1.0.0"', [], successFunction, errorFunction);
If agreedBool = true, do nothing. If agreedBool = false, then show your terms pop-up or transfer them to your terms.html page or however you want to show it. When then they click agree, save that value to the database and close your pop-up or redirect back to index.html.
tx.executeSql('INSERT INTO termsTable (agreedBool, version) VALUES (true, "1.0.0")');
As for the user choosing not to agree to the terms, I wouldnt give them an agree and disagree button. Only give them an agree button. If they dont agree, then they can close your app themselves.