Do we care about the edge case where a filename has no "."?  I think this code would misdetect e.g. a file named "zip" (with no extension) as a .zip binary file...