Set pipefail bash option and use base dir for local files.