Fixed small buffer overflow: The check for null termination needs to happen after ensuring the name matches because the strncmp will return false if the name is shorter than fsize.
basename.c:
Added support for -z|--zero argument for compatiblity with GNU basename.
Renamed local helper function from namebase to l_basename
Made l_basename match the behavior in the usage string regarding PATH_LEADING_SLASHES (which it had not supported at all)
Added some comments
dirname.c:
Added support for -z|--zero argument for compatiblity with GNU basename.
Fixed bug in l_dirname where PATH_LEADING_SLASHES wasn't adhered to if argument only contained slashes
arith.c:
basename.c:
dirname.c: