Port memxml2db.pl to Ruby

WIP to fix #269