Add types for leaves

Change-Id: Ibea2945920e523d2f3439eed2c12a5d719d178f1
diff --git a/src/utils.cpp b/src/utils.cpp
index 77466c4..a7fea46 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -25,3 +25,8 @@
         res.erase(pos);
     return res;
 }
+
+path_ pathWithoutLastNode(const path_& path)
+{
+    return path_{decltype(path_::m_nodes)(path.m_nodes.begin(), path.m_nodes.end() - 1)};
+}