futils: return GIT_ENOTFOUND when trying to read a directory

This lets the reference code return not-found when the user asks to
look up a reference when in fact they pass a namespace.
Merge pull request #1562 from libgit2/cmn/refs-namespace-lookup

Provide the user with a more useful error code when a looking up a reference which name points to a namepace