make run-doctest.py executable

catch errors when retracting rules.
added parsing (training, parsing, testing) `test/app/ptb.dynadoc`.