Simplified and fixed pear/pecl logic. [Fixes #56 / #57]