Enhanced file type detection

This changes the file detection from using file extensions to using the `file` command to support use cases where the URL does not have an extension. It does have the downside of having to download the URL before determining its type, but that should only really matter for unsupported source types, which I would consider a corner case. I tried using the `mime` flag on `file` to be more portable, but that not working for Squashfs files, since they just reported being of type `application/octet-stream`, so just matching on the full description, which is at least Mac and Ubuntu portable for the supported types.