[entropy.qa] move ELF file checks to separate unified function, add debug dir check