Slashify .gitignore template.

Without the initial `/` all such matches within the repo get ignored, and without the trailing slash files as well as directories of that name get ignored. e.g. Specifying `tmp` as well as `test/tmp` without slashes is redundant, as `tmp` already ignores `test/tmp`, as well as every other `tmp` and `tmp/`.

Note that this is a very similar patch to https://github.com/github/gitignore/pull/838, which was merged 6 months ago.

Peace,
tiredpixel