Backport bash security fixes from trunk.
Merge branch 'joyent/feature/miscfix/2013Q3' into joyent/release/2013Q3