Can't locate script library

I just migrated the HD on my system to an SSD (big improvement).

But, when I tried to run a script that used filemanagerlib I kept getting errors that it could not access the script.

I opened the script in SD and it wouldn’t compile. Same error.

I checked all two locations for libraries (system/library/scripts; user/library/scripts) and it turns out it was installed in both locations. I removed it from one, same error, put that back then removed it from the other same error.

I rebooted, same error. But then I noticed that there was a script libraries folder on the root level of the new boot volume. I looked at the old drive and it was there too. But I am certain that had not been there prior to the upgrade (I keep that directory clear as possible). I moved that folder to the trash and the errors disappeared.

What’s up with that?

Now I’m having the same issue with other scripts. I don’t think it’s related to the empty folder in the top level directory. Instead, it seems to go away after I replace the existing copy in one or both script library folders.

But, after I replace the library and try to run the script I get an error the first time it runs on the first command using the library. If I recompile it runs the second time. This has happened three times in a row with file manager; dialog toolkit and myriad tables.