Opens a file or URI for writing and provides a BufferedSink. The sink is automatically closed after block execution. Returns true if successful, false otherwise.