catgen_mkpath - build a filename path
#include <cat/gen.h>
int catgen_mkpath(char *buf, int buflen, ...);
This function concatenates file path components into bounded buffer buf, which can hold at least buflen bytes. If necessary, directory separator characters suitable for the
platform (``/'' or ``\'') will be inserted. The last argument must be a
NULL pointer. The path written into the buffer will be NUL-terminated.
The function returns the length of the path written to buf, or a negative code error code if the path would not fit into buf.