Add a line to your code:
if (tf != null)
e2.text = tf;
tf = tf.fsName;
And run your script from the ESTK with the console open. You'll see that File is printed. So tf is not a string but a file object. Use e2.text = tf.fsName to display the file's full path name or e2.text = tf.name to show just the name. The same applies to the other function, the one that shows Folder instead of the folder's name.
Is this a change in File/Folder handling from CS4 to CS5?
I doubt it. I can't check in CS4 (uninstalled that one accidentally), but in CS3, CS5, and CS5.5, File.openDialog() returns a file object, not a string, so you'd think that CS4 would, too.
Peter, thank you. that worked perfectly.
Now I get to fix all of the new problems that have cropped up now that it is running again.