Graham
Try giving an absolute path to 'mkdir'. I'm fairly sure that the exec*
family does not use the PATH environment.
That's what the 'p' in 'vp' stand for: path.
OTOH I don't remember if the exec's tack on the exe name to the args so you might need to do:
execvp("mkdir",["mkdir","test"]);