Improve macos packaging for Slicer extension
Created by: jcfr
This PR is here for review. More testing will be performed after I am back of traveling two weeks.
These changes were originally motivated to support packaging of SlicerSALT (a custom Slicer application used to disseminate powerful shape analysis methodology based on 3D Slicer open-source software). See http://salt.slicer.org/