Rewrite chef.sh to be more cross-platform.