Final fix for pidfiles. Add creation of pidfile directory.