Create work dirs when needed

It fails when some dirs aren't created.
Check if they already exist (otherwise create them)