improve check for another running instance

if another instance is running when execution begins but exits during
execution then the script can exit with a backtrace, handle that
gracefully
ensure pid is correctly recorded
mark as version 1.0.14