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

parent #454 
Is this really excludeFiles if it contains a directory?