perf machine: Use path__join() to compose a path instead of snprintf(dir, '/', filename)