I've decided to display the <file> cookies on submenus by path, the way http cookies are broken down by subdomains. Anyone with file scheme cookies is likely to have them from a lot of different files and this could be helpful. There is
a bug raised to remove the ability to specify a cookie exception that applies to all files, but no pregress has been made on implementing that change. It would be problematic because there is no way to migrate existing exceptions to the new file-by-file method (not to say they wouldn't still do it!), and also because there is no real UI support for managing exceptions on the file-by-file basis.
I prefer the cookies dialog to open unfiltered. The cookies for the current page are already visible on the browse menus, so the only real reason to open the Firefox dialog is to look at cookies *not* from the current page. The code snippet you show is not appropriate in any case since it ignores the preferences for subdomain pruning. There is a cookieControllerModule.modifyHost() function that automatically returns a string with the appropriate "www." or other subdomains pruned from the current host domain, as specified in the preferences.
On the about:permissions dialog, the current page should get selected once the full list has loaded. Unfortunately, Firefox can take 5 or 10 seconds to finish loading the dialog so you may be bored by then. Again filtering could be annoying and confusing, but it would at least speed up the initial load. I'll think about this some more.