Fix JENKINS-19877

- Modified checkFileIsNotEmpty() method to use canonical file, which
will resolve symbolic links, when possible.
- Added 4 new unit tests to exercise the modified method. Two of the new
unit tests are using new Java 7 IO API and JDK 7 or newer is required to
compile them.