Minor modification to the script to use CIM_Logicalfile, which works with either files or directories. Had problems with GetFileAttr() while running against remote computers.

This has been tested against remote and local computers now.