[Chapel Merge] Fix long path error to only check length of base f

Branch: refs/heads/master
Revision: 6f4c9f4
Author: bradcray
Log Message:

Merge pull request #17698 from bradcray/long-filename-error-basename-only

Fix long path error to only check length of base filename

[reviewed by @mppf]

This improves a recent error that was added for long filenames so that
it only applies to the basename of the filename (e.g., 'foo.chpl' in
'/path/to/foo.chpl') rather than checking the length of the path as a
whole. This is because the filenames we were creating that were too
long are only based on the basename, not the full path name. Getting
this wrong has caused some testing noise this week on platforms where
a long path is used to get at some of the test helper file names, and
this change should resolve it.

While here, I also fleshed out a comment a little bit more to try
and clarify it for those not familiar with this effort.

Thanks to @lydia-duncan for diagnosing this failure mode!

Modified Files:
A test/parsing/errors/nameLength/longPath.chpl

A test/parsing/errors/nameLength/longPath.compopts
A test/parsing/errors/nameLength/longPath.good
M compiler/parser/parser.cpp

Compare: https://github.com/chapel-lang/chapel/compare/25b1846619f2...6f4c9f4b3bec