improved regexp match for scripts and libraries checking; skipping binaries and shared libraries script check in check mode
tweaked regexp match