rework the "clean building dir" from 1055c569ffb518e698c9396193f553898b98bbe6
so it works on macosx.