Replaced usage of pathconf() with PATH_MAX