java_gen: fix java_gen on NFS

java_gen was removing the old working directory, with the loxigen
infrastructure still having a file handle open. This doesn't work
on NFS.
diff --git a/java_gen/codegen.py b/java_gen/codegen.py
index 776b8c5..4369b30 100644
--- a/java_gen/codegen.py
+++ b/java_gen/codegen.py
@@ -44,6 +44,8 @@
 import java_gen.java_model as java_model
 
 def gen_all_java(out, name):
+    # close the virtual file - we don't need it
+    out.close()
     basedir= '%s/openflowj' % of_g.options.install_dir
     print "Outputting to %s" % basedir
     if os.path.exists(basedir):
@@ -56,7 +58,6 @@
     gen.create_of_const_enums()
     gen.create_of_factories()
 
-    out.close()
 
 
 class JavaGenerator(object):