OK thank you for this. When it comes to putting this on a new mac then how do I do it? I presume I will not lose all my bitcoins?
You replace the contents of the Bitcoin folder in Application Support:
https://en.bitcoin.it/wiki/Securing_your_wallet#MacI recommend for your own piece of mind, practicing backing up a wallet and restoring it just so that you can walk yourself through the process. It can be a bit scary first time if you have a lot of coins.
I found that Multibit Wallet was better for backing up and restoring coins and if you have another computer you could always move the wallet over to there so that you can see they are safe while you do the restore.
Before I ever do a format of my macs I always clone the disk just in case anyway.
Good luck.