ensure that repository controller returns 404 sometimes

get agent id via agent_representation ref
Merge pull request #717 from hudmol/repository-not-found

Fix repo controller behavior for unfound repos