Fix tests calling done multiple times

Wrap the `checkFile()` method in an `} else {` to ensure it isn't called if `done(err)` is.