Update registry.rb

A little error checking now. Not much.