fix tomcat, jboss detection if files lack execute permission
refactored duplicate skipping