testhelper: Fix ETXTBSY when running just-written executables
Somehow we're getting ETXTBSY errors when executing executables which we
have just written via WriteExecutable()
. This doesn't make all that
much sense: the file is created atomically with the correct executable
bits and closed as expected. So this rather seems like an OS-level bug.
Let's try to fix this by explicitly syncing the file to disk.
Closes #4018 (closed)