Fix infinite recursion caused by kpm pack to a dir in project dir

parent #454 
Changed to `excludeSet` in the latest commit.