reformat to understand code
Fix for wrong output file:file:directory-list() see  https://github.com/eXist-db/exist/issues/310
Small code refactorings
Merge pull request #315 from dizzzz/fix_file_module

Fix file module