Fix `slow_query_logdir` path creation

This is #210 rebased on top of the latest master.