Fix mac packaging premissions and scripts