Add tests for "repositories/" paths.

As part of this effort, also fix up the Product entity's fields, make
URLField.get_value return a better value, and improve the error handling of
class Factory.