Added scriptstools.RunDoctestsScript.

This scripts runs doctests and handles server shutdown after each document
test.