Bradme: Add work directory setting, factor out command execution.