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

Bonus fix: Also check the unlock/nounlock argument to flash_fastboot.
Merge pull request #298 from jld/flash-check-args

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