Changed DetectOpenFiles implementation to one that is supported on x64 as well, however the current implementation tends to lock while querying file name. A lot.
Fixed lock-up and other minor changes in DetectOpenFiles.