util.py: fix an error in writeTreesToFile

It would barf if the meta argument was malformed (e.g. an empty string)

Fixes #29