fixed bug in unit-test replacing reference to local file with
tempfile.TemporaryFile