I am +1 if you fix a few things up first.
Most of the concerns I have were already voiced by Phillipe Jausions on the mailing list. I would like to see you do most of the things he wrote in his post (http://news.php.net/php.pear.dev/37214)
Mainly, use the class/directory structure Phillipe suggested, it makes everything much cleaner and it's compliant with PEAR standards. Also, use PEAR_Error for error handling as opposed to using exit().
Also, as suggested I would like to see a factory method used for creating the object.