build: ensure proper path is cleaned of .git files.