Problem: Icon filetype not recognized from the first line. Solution: Add a check for the first line. (Doug Kearns)
Problem: Filetype detection from file contents is in legacy script. Solution: Use a compiled function for filetype detection.