fixed bug with copying dirs in templates:build, styled code some