prepare4dev_stm32f4.sh: cleanup

- convert integer math to use (( )) or 'let'
- better error handling
- final status line