cleanup: properly handled all input/output streams in K. Now they are all declared inside Java 7 try-with-resources blocks, that ensure proper cleanup and error handling. Only where needed.
Results:
1. Possible fix for ktest file-related issues.
2. Definitely should reduce the amount of open file handlers.
3. Visible performance speedup, due to the fact that all file streams are now  wrapped into buffered streams.