def get_first_char fname
      if File.exists? fname
        begin
          f = Zlib::GzipReader.open fname
        rescue Zlib::GzipFile::Error
          f = File.open fname
        end


        begin
          first_char = f.each.peek[0]

          return first_char
        ensure
          f.close
        end
      else
        raise ParseFasta::Error::FileNotFoundError,
              "No such file or directory -- #{fname}"
      end
    end
def get_first_char fname
      if File.exists? fname
        begin
          f = Zlib::GzipReader.open fname
        rescue Zlib::GzipFile::Error
          f = File.open fname
        end


        begin
          first_char = f.each.peek[0]

          return first_char
        ensure
          f.close
        end
      else
        raise ParseFasta::Error::FileNotFoundError,
              "No such file or directory -- #{fname}"
      end
    end
Get the first char of the file whether it is gzip'd or not.  No
 need to rewind the stream afterwards.