fix bug when test_fail is called via a do statement

test_fail used $0 as the filename instead of the filename reported by
caller. Under normal execution these would be the same but if the test
is executed by a do block then these would no longer be the same.
Merge pull request #369 from nnutter/master

fix bug when test_fail is called via a do statement (for 0.98 series)