Recoded ami-packer as a ruby script.