Replace the passthrough option with a file test.

As @DavsX proposed within the discussion of issue #664.