Change return codes, so we know which operation we failed on.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Break out md5sum check before flashing.

This way we know if files are bad before we enter the flashing, erasing,
and other stages!

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>