Ensure that hash db files are opened in binary mode for the initial magic bytes checking (not reading an 0x0D was causing a bug).