Robustness: Check sed exit status whenever a file like $TODO_FILE is used.

And abort the action when that fails, instead of continuing with empty / invalid data.
Added "set -o pipefail" in some actions so that a todo.sh error inside a pipe will also cause an abort.