Fix issues with NIOFileResource and symbolic links