When I enter the URL http://<server>:9704/analytics/saw.dll, I get the error "can not find the website" however, when I enter the URL http://<server>:9704/analytics/saw.dll?bieehome, I can enter without problems to OBIEE (same user and password that in the credentials file).
The syntax of your runcat.sh looks OK, but the symptom you describe here (highlighted) sounds very odd. Are you using any kind of load balancer? Does the server go up and down, that would account for it not being available sometimes? I'm grasping at straws here.
I'd try and resolve this problem first (http://<server>:9704/analytics/saw.dll not working) because without it runcat.sh is never going to work.