It seems that a small bug snuck into Ditto 1.0.1...
Unless a TV sort is used, the sort is inverted (ASC instead of DESC and vice versa).
The temporary fix: Disable/Remove this code from the snippet if you do not need TV sorting:
// ---------------------------------------------------
// Sort array
// ---------------------------------------------------
if ($advSort != "0"){
$ditto->customSort($resource, $advSort, $sortDir);
}
This will be fixed in 1.0.2 which should be out later today.