Changing BurnWriter Open function so it fails if the file we are opening does not exist

Previously, target file would be created if it didn't exist.

Also, for both BurnWriter and BurnReader, in Open function we now check if they
had previously opened file. We close the file if that is the case.

BUG=None
TEST=Run image_burner_tester with no device attached and check it fails.
     var/log/image_burner.log should contain ERROR:
     Couldn't open target path /dev/sdb: no souch path or directory (or something similar).

Change-Id: Iea2e97a46fb5f6ba553be8d43c5e82d330f0e335
Reviewed-on: http://gerrit.chromium.org/gerrit/2936
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Tested-by: Toni Barzic <tbarzic@chromium.org>
1 file changed