Initial commit

Ptree.parse and Ptree.generate seem to work, except that they
handle endianness (mostly) backwards -- parse works from
left-to-right removing low-order bits, but generate works from
left-to-right adding high-order bits. This shouldn't be too
hard to fix.
Get rid of scopehack
Fix Ptree.generate endianness to match Ptree.parse