Adds platform check so ls works in mac os