taskd: a few fixes

* fixed configuration variables reading, was preventing taskd from dropping
  privileges

* fixed a warning related to a closed filehandle on taskd when the http child dies