core: broken unit test

Fixed a unit test that would break if a file didn't exist in a certain
environment.

Unit test now creates a file "on the fly" (without writing it to the
disk) and uses it rather than relying on a file that may or may not
exist on the disk.

Change-Id: I9d0627ea770a3194515b22b6d6cc5df5fe8df829
Signed-off-by: Alexander Wels <awels@redhat.com>