gtws.sh - Change die() to work better in functions

Have die() return failure if it doesn't exit, allowing the following
construct in functions:

foo || die "foo failed" || return 1

This will exit if called from a non-interactive shell or a subshell, but
return if called from an interactive shell.
cdorigin - use the git origin if local