add end_test, minor cleanup, added hdlrun.cleanup() call