Gearman agent

update: fixed issues mentioned as well as pyflakes/pep8 compliant now.