etc: Make tidy more resilient to dirty build directories