ruby copy tempfile to file