The future of Edinburgh's festivals is under threat from the government's "current obsession with a hard Brexit", according to MSP Gordon MacDonald.