Fix for when a repository fails to clone or pull and purge deletes everything anyway