Added method Path::preallocateSpace().