`test -d` to make sure awscli is actually installed

brew --prefix shows the location that a package is or would be
installed:

https://github.com/Homebrew/homebrew/blob/a8582c58/share/man/man1/brew.1#L448-L449