`rm -rf` is not platform independent. Try [shutil.rmtree](https://docs.python.org/2/library/shutil.html#shutil.rmtree) instead.