Move templating into tar object

The tar object can now template things inside its workdir and remove originals.