Replaced "rm -rf" with rmtree function from shutil.