Update header.py to avoid trying to add headers to common image, non-text document formats, and other media that may be encountered.