Mac vs other changes.

Added a if statement to handle the case if the uname is Darwin for mac.
This can switch on annoying ls commands and path that differ.