Order candidates by load order correctly

Instead of relying just on the filename, which differs between
variations of ruby, order by position of the file in $LOADED_FEATURES.

On ruby-1.8 $LOADED_FEATURES contains relative paths, so we use
end_with?. This happily also works for absolute paths if we first
normalize with a pass of File.expand_path.