What upgrades?
Generally a Dir$() won't scan folders it doesn't have access to.
Was ND9 or its service installed under a particular account?
How about the underlying OS. Was the underlying OS upgraded or modified so that the directories are configured with different accesses?
If Domino is still running as SYSTEM, it should have access to directories granting access to SYSTEM.