Add 2 word write to flash test.

--BRJ
Wrap write_flash comms in try/catch block.

Probably should do this in more places so that we can return an error
code rather than causing the calling program to exit.

--BRJ