Universal test of unsetopt command

According to http://stackoverflow.com/a/7522866/189431 it should work in "bash, zsh, ksh and sh (as provided by dash)".
Merge pull request #322 from koenpunt/fix-unsetopt-test

Universal test of unsetopt command. Closes #300
Slurp test unsetopt stderr
Merge pull request #324 from hurrymaplelad/quiet_type

Slurp stderr from  test unsetopt
helper method for testing existence of commands
Merge pull request #326 from koenpunt/has-command-helper

helper method for testing existence of commands
fix copy-packages
fix copy-packages in zsh (without breaking sh and bash)
Merge pull request #327 from stuartf/issue-314

fix copy-packages
merge in changes from creationix/nvm
Merge pull request #328 from naartjie/master

fix copy-packages in zsh (without breaking sh and bash). Closes #223, fixes #299.