Added flash-all.sh script for Mac OSX with fixes