Ben/schema dumper

write some minimal support for saving global-uid flags in schema.rb -- otherwise things get broken easily. 

@staugaard @grosser @bquorning 
no need to assign pk, it's the return value