Change nftw() to depth-first scan to handle restoring directory permissions correctly.
When sorting cause directories to be sorted after files and in descending order of nesting level.
Take out stray printf().