fix saving / restoring gem specifications, update #41, fix #46