Only the base part of startPath is kept, since this routine is typically
used with a script’s __file__ variable as startPath. The base of startPath
is then prepended to all the listed files, forming the output list.