Dynamically adjust pwd buffer query size to allow for when PATH_MAX is default defined instead of being provided by the system C library. (fixes #2206)