Allow no last space for gist number only in gist tag

Currently, it is necessary to put a space after a gist number before "%" if no file name is given.

i.e.: 

    {%gist 123456%}

This will be converted to "" (nothing), w/o errors.

It should be

    {%gist 123456 %}

In addition, if the given arguments are not proper, I think it is better to give an error instead of putting nothing.
(With "diff" change, it just passes arguments to get_gist_from_web, and it should give an error.)