in reply to fsyncing directories

Or is this just a bug in IO::Handle?
Probably. I'd even argue that the Perl way is to do the right thing. So, an IO::Handle -> sync (where the handle is a file handle) call should first do a flush (to flush out the API buffers), then a file sync, then directory sync.

But no doubt there's some code out there somewhere that prevents a change towards DWIM behaviour.