refactor posix test for new test suite layout
Check if test input file exists.

Not all tests have input files, so check if one exists and run the
test program accordingly.