(__open_catalog): Simplify handling of file descriptor.