chmod script for directories and files