Add --run-example option and test script