Create pid and log directories