Small changes to fix circularbuffer

Fixed initialization so that strings work with circular buffers.  Made
circularbuffer indexing 0-based so that the tail points to the final
value of the buffer.