The OP is not creating a directory, but removing it. Maybe the error is due to not being able to create the directory in the first place, but it also may be due to the the directory being removed while it's the current directory...but there's not enough code above to tell. And
eval doesn't suppress warnings, it suppresses errors. Or did I miss the OP changing beyond recognition after you posted your answer :-)