use PATH_MAX instead of MAXPATHLEN