adds validation error handling
rename "metadata" (the global one) to "registry" and make it private
save updated metadata
Merge pull request #9 from adobe/dangoor/errors

adds validation error handling