source-archive: Close in use files before removing them

Testing: Make sure "ant release" works on Linux/MacOS and Windows.