Make log dir before creating pid. Fixes #482