Huh. When I was working on this earlier, I was seeing unexpected behavior using `shellescape` (hence this jankiness) but trying it again now it seems to work. New commit incoming — thanks for the suggestion!