Various fixes.

Always write points starting at index 0.
Return correct number of points read.
Don't overadd dimensions.