Grooving and perforating machines