Simple JCR export test + few other enhancements

This is the first version of the test. Needs polishing, but it is already useful.