fix deletedirectory
add delete dir tests