8232003: (fs) Files.write can leak file descriptor in the exception case
Summary: Be sure to close the leaked OutputStream in all cases
Reviewed-by: alanb, bpb, clanger
* The "clangd" indexer must be present in PATH, or configured with "clangd.path" in user preferences.
* If building with clang (default on OSX), precompiled headers must be disabled.