Remove unused file permissions call and replace file owner check with Java 7 NIO