util: move the path stringify to the library