Updating setup script to overcome issues while deleting directories