Apparently rmtree needs to stat the initial working directory (maybe so that it can
chdir back to it when finished). Do you know of some some reason that it can't? Does the directory still exist, etc. (it would maybe help if $! was included in the error message)? Can you
chdir to a directory that can be
stat'd before executing rmtree?