fix a test that was failing when executing the file directly from its
directory (unsafe path handling)
Merge remote-tracking branch 'upstream/master' into 617
adding another test for read(.., headonly=True)