Refinements and bugfixes related to content-type override.

... plus a .gitignore file.