Not really direct help for your prob, but I use epa file encryption in GNU Emacs, already a part of Emacs 23, works with GPG... Maybe switch to epa?