Sort more nodes.

Change selection criteria to sort any node with an Include attribute. Add null checks to cope with all nodes. Switch to Wide chars for Windows API routines. Use unique_ptr instead of auto_ptr