Install script totally rewritten. Supports OSX 10.9
Merge branch 'master' into mac_install