Fixed input file overwriting condition.

This fixes issue #33.