tools/perf/build: Fix non-existent build directory handling