More info:
Here is the error message, and what is located in the array:
These files do exist.

Error 2 - The system cannot find the file specified.
%SystemRoot%\System32\Catsrv.dll;2000.2.3511.0
Error 2 - The system cannot find the file specified.
%SystemRoot%\System32\Catsrvut.dll;2000.2.3511.0
Error 2 - The system cannot find the file specified.
%SystemRoot%\System32\Clbcatex.dll;2000.2.3511.0
Error 2 - The system cannot find the file specified.
%SystemRoot%\System32\Clbcatq.dll;2000.2.3511.0
Error 2 - The system cannot find the file specified.
%SystemRoot%\System32\Colbact.dll;2000.2.3511.0
Error 2 - The system cannot find the file specified.
%SystemRoot%\System32\com\Comadmin.dll;2000.2.3511.0

I did hardcode a directory, and that one worked.
But like i said, this exact script one call above works perfectly. I did not make any changes to the function.