Bug 940054: Make flash.sh check its arguments more carefully.

Bonus fix: Also check the unlock/nounlock argument to flash_fastboot.