add "set -o pipefail".
Merge pull request #137 from hansode/pipefail

add "set -o pipefail".