Fix #11509. Significantly increase test coverage for fileinput. Patch by Denver Coneybeare at the PyCon 2011 Sprints.