Optimize sort functions

Status.php -
Optimized sorting functions,
Added $ValidTimestamp for display of `created time`
Added anchor function to create header sort anchors.
Added populateDirectories function to fill directories array

cached.phtml -
Updated to utilize new functions added to Status.php