Maybe a `join_path` function is in order.  ;-)
Here's an implementation:
```Lua
function join_path(...)
	local parts = {...}
	local s = ""
	for _, part in ipairs(parts) do
		if s ~= "" then
			s = s .. DIR_DELIM
		end
		s = s .. part
	end
	return s
end
DIR_DELIM = "/"
assert(join_path("minimal", "mods", "default", "textures", "default_dirt.png") ==
		"minimal/mods/default/textures/default_dirt.png")
```