Use FileUtils.chmod in preference to platform-specific shell commands.