convert $0 to $PROGRAM_NAME refs #665