Fix subtree allocation that was causing invalid (out of bounds) reads and writes

phi is now allocated the same size as the parent tree node phi. This was causing out of bounds read and writes because num_fcns was less than num_verts but it was indexing as if it were num_verts size.

Passes test suite.

Fixes #57