- Remove unused code
- Use standard functions declared in common.c
- Change tests to do a runtime test for the max name length of a path
component (aka NAME_MAX). The actual value might differ from the hard
coded NAME_MAX depending on the file system used.