Normalize controller detection

Nested controller directories that are named similar to controller files (i.e., foo/ and foo.php) will be detected differently between the HFS+ and Ext4 (possibly others).

This patch will normalize the controllers by reverse sorting them so that regardless of the filesystem, the results will be the same across different filesystems in a way that does not break backward compatibility.