Use PATH_MAX rather than FILENAME_MAX where appropriate.