As you are passing this to an external process to test, flush would be WhatYouWant(tm).  rewind resets the pointer to 0 so the forked filehandle copy is looking at the right start position, but without flush, you can't be sure that visudo sees the entire file.