Macroize stpcpy and xstpncpy.
Improve path building API and update usage.

Implement concat_fnames_buf and append_fname for when concat_fnames
cannot be used due to the client using a pre-allocated buffer.

(aktau) Return pointer to end from add_pathsep(). Allows slightly more
optimal code for callers.

Add "restrict" to appropriate arguments.