More robust; observe .gitignore.

Also, do as much as we can before creating the actual gist, so that if it fails
there isn’t anything to cleanup. Fixes #4.