perf_counter: tool: handle 0-length data files