Better checking of ignored files/directories

This change allows us to easily handle which files & directories should be ignored when processing.