Merge pull request #72 from ez121sl/develop

Close output files properly when copying source files
Use sourceEncoding when discovering namespaces
Merge remote-tracking branch 'upstream/develop' into develop