Add routines to detect if files are bins to utils
initial fix for #6698