Fix twosigma/beaker-notebook#684, handle truncated gist