Fix bug where an empty file was treated like a missing file

Closes #301