add update gist file and make sure filename is being fetched instead of gist.txt

Hi there @voltagex
I just made a little fix to update an existing gist.
I know its a bit messy and I will appreciate more fine-tuning as well.
Thanks