Fix deletion of Python cache directory