Accept an Array (as well as string) for options.exec

When an array is given, don't do any splitting on spaces.

This is a simpler alternative to #418 which doesn't affect the CLI interface, just the API. Although it does fix a bug in the CLI's `{{filename}}` and `{{pwd}}` expansion as a side effect, which I've added a test for too.
oops, thanks - removed.