Move the creation ofthe pids directory