Lots of changes to fix issues with installer wrappers on osx #1030