JBTM-2171 Updated the rebase script to work on Mac