fixed bug with global installs.
Merge pull request #91 from npm/global-script-fix

fixed bug with global installs