fs: write strings directly to disk

Instead of first converting the string to a `Buffer` instance, use the string data directly to write to disk.

This partially addresses #5607