Make Python .gitignore directory entries match only directories

This commit makes Python `.gitignore` directory entries match only directories (by adding a terminal slash as appropriate).

This commit also alphabetizes the distribution/packaging section after separating the directory entries from the file entries.  I left alone a few entries that may or may not be directories (e.g. *.egg and the "Mr Developer" section).