Make the user profile page happy

This page uses from functions from the util.js module. Also, we moved
the batch_perms_submit function from a global function to a property
of a global "pub" object. Is this what we want?

Note that while these changes suppress the error, I am not sure it
"fixes" the page. It seems like there is missing functionality.
Merge pull request #579 from iwillig/devJavaScriptPathFix

Make the user profile page happy