Fix an invalid read.

This probably only occurs on the empty file test.
Merge pull request #147 from QuLogic/valgrind

Fix an invalid read found with valgrind.