Assuming that the last field (11) is the unix timpestamp by with you want to sort the files - and I imagine it will be - you can just replace
$sort["item_$i"] = filemtime($path.$file_name);
with
$sort["item_$i"] = (int) $pieces[11];
in my code above and it should do the trick.
Also, you will need to call array_reverse() after asort() to get them in order of newest first, sorry I missed that in the original post.
For anyone who is wondering, the reason I have used 2 arrays, $data and $sort, is to avoid collisions in array keys where the timestamp is the same in two files.