Fix a bug that skips matched directory.
Really applies chmod().
Fix a bug that permission 000 becomes empty string.
Add check for tty/piped/redirected output
Add check and wanring to user for directoies that have no 'r' permission.