Test for gist_id before using; fixes #3