I tried to reproduce your set-up from your description, and it works like a charm for me, so unless there is some difference between Windows and Unix that is relevant to this problem, or your code is significantly different from mine, I have no clue what could be the cause of the errors you're having. I include all the code below; maybe by comparing it with yours you will to figure out where the problem is. In my case, all the files live in /tmp/test/testlib.
It's indeed a path problem, and if all the scripts are in the same directory it works fine. So since my scripts are in different directories i used Cwd and chdir'ed to the correct lib directory before doing the require. Since the caller script is in another directory it works ok this way .