Make the stats pipe dir configurable

It can be specified for writing and reading.