Not that it would help you much now, but once I get around to upload my
FileSystemObjects-module to CPAN you could simply use
$fso->name. Wanna betatest? (It's pretty stable right now besides some minor issues of resolving relative paths to absolute paths).