Some filetype detection tweaks