replace copytree with same algorithm but handles .arm jinja2 templates