Fixes directory excluding
Updates code to be able to exclude single files