Fix for running on Windows: close temp dump file before calling pg_dump,...

... otherwise pg_dump will get a SHARING_VIOLATION accessing the dump file because more than one process has the dump file open.