UFOReader/UFOWriter fixes and updates

CAUTION: This is a follow up to #24 It also inculdes all commits of #24 So don't merge it if you don't like the other one ;-)

I needed these changes to properly (as far as I can judge) write a UFO v3. I use https://github.com/typesupply/defcon/tree/ufo3 which also needed some changes. (PR is coming soon)

The script used to save a UFO v2 as UFO v3 is this: https://github.com/graphicore/project_zero/blob/master/bin/upgrade_to_ufo_v3