My guess is that pgp doesn't want to run without a terminal. I think I've seen it complain about not being able to ask for the passphrase. Isn't there an option in pgp to allow reading the passphrase from a filehandle? That would get around the lack of terminal, and probably get rid of Expect as a byproduct...