sha256_file: ensure the input file is always read completely

Nothing guarantees us that read() will always return BLOCKSIZE bytes, we can't
be sure we've reached EOF before it returns 0.