I stayed up way too late last night, not being able to get this AppleScript (or any other technique) to work. Today I found the ‘missing piece’. I had a BBEdit text file with blog posts, each on its own line. I wanted to split that file into separate documents, one per line.

Screenshot of the Applescript.
Finder window with numerous files created by the script.