mainloop: Cache devpath at startup

Currently the devpath is determined after a bus error to make
a callout.  Finding the path at startup is less prone to race
conditions around ENOENT on driver unload in the event of a
callout.

Change-Id: I8ce8d9f630c8b7ecc398082002aa113ab352d3cb
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/test/test.cpp b/test/test.cpp
index 07aaef7..90a07c0 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -37,6 +37,7 @@
     MainLoop loop(
         sdbusplus::bus::new_default(),
         dir,
+        dir,
         "xyz.openbmc_project.Testing", "/testing");
 
     auto threadMain = [](auto loop)