Standardize use of filesystem

If <filesystem> exists, use that, if it doesn't, try
<experimental/filesystem>. Either way, access it from std via a
namespace splice.

Change-Id: I5b35ee9f74b88e188cb3ca3fed9abaec64933697
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
diff --git a/selutility.cpp b/selutility.cpp
index b4675d1..5935de2 100644
--- a/selutility.cpp
+++ b/selutility.cpp
@@ -1,6 +1,16 @@
 #include <chrono>
 #include <vector>
+#if __has_include(<filesystem>)
+#include <filesystem>
+#elif __has_include(<experimental/filesystem>)
 #include <experimental/filesystem>
+namespace std {
+  // splice experimental::filesystem into std
+  namespace filesystem = std::experimental::filesystem;
+}
+#else
+#  error filesystem not available
+#endif
 #include <phosphor-logging/elog-errors.hpp>
 #include "host-ipmid/ipmid-api.h"
 #include "xyz/openbmc_project/Common/error.hpp"
@@ -241,7 +251,7 @@
         std::sort(paths.begin(), paths.end(), [](const std::string& a,
                                                  const std::string& b)
         {
-            namespace fs = std::experimental::filesystem;
+            namespace fs = std::filesystem;
             fs::path pathA(a);
             fs::path pathB(b);
             auto idA = std::stoul(pathA.filename().string());