Coverty reported leakage in resources in some of the audit tests which involved opening a
file and not clcosing it. This revision fixes that issue.
Also, some more `ATF_REQUIRE` statements to restrict errors.
NOTE: Earlier version had this snippet
returns `-1` since the `pipestream` has already been closed one line above. So removed it