added in platform detection and macinstall function
fixed indexof bug
tests passing on mac