Integrated terminal cutting and folding machine