data_layout: fail better on file access errors

fread could return only a partial result
(eg. NVBOOT_CONFIG_TABLE_SIZE_MAX - 1 bytes),
which right now would be accepted and only
resolved by later code.

Found-by: Coverity Scan
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>