Handle truncated core filenames while collecting backtrace using task attach_logs_cores

Change-Id: Ia85de2f42815f1e54024716f9646bffc383219c5