Added testcase for PLXCOMP-164
Added support for java7 setAttribtues
Converted to use misc IOUtils instead of duplicating code