Fixed error with writing generated Resource modules when Resources are imported in the console, tested in both the Eclipse console and the Rascal shell