Fix return value of upgrade script
Add emacspipe script