Script works fine with NetBSD's /bin/sh, do not hardcode /bin/bash.
refactored recursive directory scanning
option --follow for following symlinks to directories
corrected a missing newline
fixed reading of empty files