Removed some duplication and extended the timeout in consideration of all files being processed; seems to make more sense.
Merge pull request #5 from huntc/timeout-check

Improved timeout code