Improve calculation of ignored files/dirs
Fix a couple of incorrect let expressions