Improve calculation of ignored files/dirs