Added support for headers and some new file types, along with upgrades
to safely checking some extensions without accidentally assigning the
wrong type