fix nil path when not using gist cache
Added safe_wrap (escaping markdown and textile) to cached gists. Closes #917
Merge pull request #916 from Keithbsmiley/2.1

Fix nil path when not using gist cache