Fix Twee: add 3rd arg to Header.factory()

This fixes Twee after the changes in e8454bd broke it.

This pull request includes the commits from #122 as well since it depends on them; only the last commit is new.