Irish meat company Kepak has received funding from the Scottish government and the European Union that has secured the future of one of its plants.