Adds target to ignored directories.