add exclude option

This adds the exclude option, enabling exclusion of directories and files