Fixed input file overwriting condition.

This fixes issue #33.
Merge pull request #34 from jchoude/fix-input-overwrite

Fixed input file overwriting condition.