Isolate code ab bit so it can be reused later
Fix unit test
Change documentation: exist-2.2 requires Java7
'develop' is now eXist-db 2.2 ; not sure where to put the RC2 :-)
Merge pull request #299 from dizzzz/misc-fixes

Misc late minor fixes