backport to java 6

1. removed use of diamond operator '<>'
2. replaced multi-catch with single catch of the Exception class
3. replaced try-with-resources (Scanner) with try-finally
4. removed usage of Files and Path classes
5. build the backport with both jdk6 and jdk7, see .travis.yml
6. use classifiers to separate the builds for jdk6 and jdk7