Don't you get the same set of problems with cwd?
In reply to Re^3: Current file name by JavaFan in thread Current file name by Selvakumar