Fix calculation of pid file name.