Batch processing for Java and JavaScript files

Incorporates Ian's changes to allow batch processing of Java files, and David's changes for the same in JavaScript.

Will's work on incremental revision processing has been merged too (thanks Ian!).

Warranty: Works on my machine.