Worker multiple matches

Adds tests to and closes #258

Also corrects cgid/cgi mod behaviour discovered during testing.