Update for 0-byte file support, including test case.