Pass a FD to resise_file and add a testcase.