Thanks for this great contribution, it's very useful.
Correction:
I've used in under a grid of computers running different OS: GNU/Linux, Mac and Windows (XP). When the shared folder is on a network computer (not mapped to a local drive, for example: \\servername\sharedfolder); Windows systems fail trying to delete the semaphores, causing the master process run forever.
The solution I found is to slightly modify compsep.m and concatpath.m as follows: