Fix bugs with ignoring rules with subdirectories