Fix file reading when loading platform resource.

fread return the number of samples read. In our case,
we should be reading "size" samples of 1 byte instead of
1 sample of "size" bytes.

Reviewed by: Nick Diego Yamane