Wrap os.lstat in a try/except block
Merge pull request #9518 from techhat/filemod

Wrap os.lstat in a try/except block