Improve FORTRAN heuristic.
Merge pull request #1848 from larsbrinkhoff/again_with_the_fortran

Improve FORTRAN heuristic.
Samples for xml.fr and html.fr.
Fix #1731 to allow samples with multiple file extension segments.