Fix crashes when source files are empty.

Fixes issue #33.