Answered my own question again: it didn’t like the quotes around the mp3 file paths. Now works fine…except that the playlist has 9218 members and LMS can’t cope. I need to make the day’s playlist shorter.
To back-track a little: I was concerned that the genre-based random playlist of LMS was missing some of my music, probably because it’s not tagged properly. So I thought I’d create my own playlist, extracted from the filepath of my ripped CDs and then shuffled. However, it turns out that this list is too big for LMS. So my solution: using crontab, shuffle the tracklist each night, add back the #EXTM3U header, then copy the top 300 tracks into a new playlist file. Finally, get LMS to check for the new playlist every morning. This seems to work fine (so far).