add recursive directory deletion support for test purposes, remove test directory before exit