path_utils: Use unique_ptr but explicitly specify the deleter to be free()