Fixed issue related to XML::LibXML and input filehandle opened in something different to binary
mode.