Updates file deletion method; fixes some failing tests.