Surface document names in the loader API.

The loader will use the file path if you use the file API.
Add a validator to _env; it accidentally never had one.
Change test extra FK to use non-dict document object.