Scottish government owned ports body CMAL has agreed a deal which will be completed by the end of the month