I save a temp file with System.tmp_dir() <> path. In macOS, the tmp_dir is something like /var/folders/97/wznf75697jgbhl61rg5wj0pr0000gn/T/ while in Linux it is /tmp, missing the slash at the end.
Shall we always ensure a slash at the end or does it design by purpose?
Because it doesn’t matter, you should always use Path.join/1,2. Not all OS’s use the same slash, not even all OS’s use any slash at all (didn’t beOS use : or something, and there are others too).
If I were to make the BEAM interfaces from scratch I absolutely would have a path be {:path, "binary"} instead of just a plain binary.