Update file_list.php

Reduced the number of calls to $f->getPath() for simplicity and tidied up the foreach loops