fix some rt cleanup and failure edge cases

Should probably include the directory being deleted since it could be anything.