Improvements to the gearman check
Refactoring and python 2.4 compatibility fix