This should go in the Tizen _build.js script. The tiappxml.js file should simply parse the <tizen:privilege> tags into the resulting tiapp.tizen.privileges Array.