Fixes to postinstall script for OSX installer
Fixes to postinstall script for OSX installer

* Fix how the user is obtained
(http://apple.stackexchange.com/questions/144159/how-can-i-determine-the-invoking-user-in-an-apple-installer-postinstall-script)
* Do brew install/tap commands only if the packages are not found
  * This was we avoid errors from double installation

shehzan10/arrayfire,munnybearz/arrayfire,umar456/arrayfire,shehzan10/arrayfire,arrayfire/arrayfire,9prady9/arrayfire,9prady9/arrayfire,arrayfire/arrayfire,umar456/arrayfire,9prady9/arrayfire,arrayfire/arrayfire,munnybearz/arrayfire,9prady9/arrayfire,munnybearz/arrayfire,arrayfire/arrayfire,shehzan10/arrayfire,umar456/arrayfire,shehzan10/arrayfire,umar456/arrayfire