I don't know firsthand how Perl performs on Vista, but I can tell you that it is attempting an unbuffered file write operation that is returning successfully with the number of bytes that it thinks it has actually written (link).

If KotOR can successfully save over the top of that slot, KSE should be able to as well.