fix mkdist to work with the new java layout and ignore .git files
fix OOB code in WS