Handle access errors scanning directories

Trying to read a directory that is visible but not accessible, or a
symlink to a file in a directory that is not accessible will raise a
PermissionError. Output these and then continue.

If os.scandir() raises an exception then the finally block accesses
"scanner" before it is assigned, raising an UnboundLocalError.
6 jobs for import-eaccess-fix in 5 minutes and 57 seconds (queued for 1 second)
Status Name Job ID Coverage
  Review
manual review_docs #49972
docker allowed to fail manual
manual review_front #49971
docker allowed to fail manual
 
  Lint
passed black #49973

00:01:07

passed flake8 #49974

00:00:31

 
  Test
passed test_api #49975
docker

00:04:50

passed test_front #49976
docker

00:01:42