Extend grading interface to avoid /bin/sh when mutliple-commands are needed

Since 3793683b813c60760e951c6a43e0a03e07f9d8e7 we effectively enforce the one-process limit but that makes Python, PHP and Java fail as they use `/bin/sh` to bundle commands together, and that seems to cause a `fork()`. This PR fixes it.