Move run counter code to ScanHelper
The run counter is stored in ~/.yarr, and this reduces the potential for problems if this changed in the future.
Also coalesces string building for the local DB configuration paths.
BTW, C++17 has std::filesystem, so this MR could be extended to use that instead of calling system("mkdir")