Wrap os.lstat in a try/except block

Ping @thatch45.