Only print fish_greeting for interactive shells

Shell scripts that use `read` should not trigger fish_greeting.

Fixes #1401.