Fix syntax error and add missing environment variable in pagerduty script

Fixed two minor issues with the pagerduty script introduced in 9605ed08831ea7a9b557b875a5e582c6c01911b1