test cleanup should not use SAFE_FILE_*

Add FILE_PRINTF() and FILE_SCANF() equivalents to SAFE_FILE_PRINTF() and
SAFE_FILE_SCANF(). The difference is that the newly added functions does
not exit the test execution and only prints a warning and therefore can
be used from the test cleanup().

Make use of them in the testcases.

Signed-off-by: Li Wang <liwang@redhat.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>