Cleanup: simplify switch statement, reuse build.IsLocalImport
Cleanup: simplify switch statement, reuse build.IsLocalImport

We already import and use build package here, so there's no harm in
reuse. The code is both shorter and more readable.

golang/dep,golang/dep,ibrasho-forks/dep,ibrasho-forks/dep,golang/dep