The code is quite messy, the implementation is fairly slow, but the structure seems sound and it passes the testsuite. basename {/} and {/.} implemented. Flushing of STDERR and STDOUT after each job completes.