ENH: Match pathname pattern to avoid extraneous files.