Check if file contains a .dex file before reading its content. Avoid some ugly exception code.