The preposition "ex" is followed by the ablative case in Latin. Ablative singular of machina = machina, plural = machinis. The wiki source given above gives "machinas" as an alternative, but this is incorrect.
Di is just an alternative form of dei, the plural of deus.