Fix flagtesting code to use stdin for source

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>