merged dinda.java and output.java to kwic2.java

also added printToFile method