Improve error handling on /showtree and /showfile

Technically, change Repository.fromSHA1() to raise a GitReferenceError
when it doesn't find a repository.  That error has top-level handling, so
no further changes required on /showtree and /showfile.

Also minor adjustments to a few other call-sites of Repository.fromSHA1().
Add test for /showtree and /showfile error handling