Add diagnose script.

[ADDED]     diagnose is a script for checking network connectivity and diagnosing possible causes of breakage.