fixing pid dir creation