Add /usr/local/bin to PATH on Mavericks
Fix os name check and variable assignment