Completed Tree Saving Code

Users can now save trees to flatfile storage.