Updates relating to Mac OS 10.5.

Bug fixes relating to the script working on Mac OS 10.5 and also some other minor bug fix improvements relating to pre-flight checks.