Added PATH to deploy script, made script even more defensive