I'm guessing that your CERTPATH in the verisign.c file which is compiled when you "make" the verisign-module is not set correctly.
If your verisign SDK is (for example) located in /usr/local then your CERTPATH in verisign.c would read:
*CERTPATH = "PFPRO_CERT_PATH=/usr/local/verisign/payflowpro/linux/certs";
The reason test.sh is working is because this var (and some others) are set up inside that script.
Feel free to ICQ me via 286871023 and I can help you set this up.
Janine's right, however, that Authorize.net is the better way to go (if you don't have any contract binding you to your merchant account/VeriSign).