Function bu_basename() says it'll return things that it doesn't. For instance, the input "////" should return "/" and "a/" should return "a", but in both cases the current code is returning an empty string.
I edited the code to solve these problems. I had to include string.h lib and also allocate a new string since the input string may need to be modified.
I've attached the diffs in files include/bu.h and src/libbu/basename.c