Make the code used to open (non-stdin) ES files and deduce their type (called by esreport, esdots, esfilter and esreverse) rewind the ES file after it has read forwards.