remove unnecessary header include
switch from MAXPATHLEN to PATH_MAX, and use <limits.h> not <sys/param.h> for portability