Break up .gitignore and correct its syntax.

Use leading / to indicate paths relative to the present directory,
move all the bits for tests/ into that sub-directory.
Merge pull request #267 from ediosyncratic/gitignore-cleanup

Break up .gitignore and correct its syntax.