taskd: bug fix from previous commit

directory validation needs to preceed other checks, or taskd will not start.