Added test script for ctridiag example.
Also fixed some compilation issues and added a useful note.