#!/usr/bin/env python

import subprocess

NOTEBOOKS_DIR = 'notebooks'
SKIP_NOTEBOOKS = ['Bonus/What to do when things go wrong.ipynb']


def run_notebook(notebook):
    args = ['jupyter', 'nbconvert', '--execute',
            '--ExecutePreprocessor.timeout=900',
            '--ExecutePreprocessor.kernel_name=workshop',
            '--to=notebook', '--stdout']

    args.append(notebook)
    with subprocess.Popen(args, stdout=subprocess.DEVNULL, stderr=None) as proc:
        proc.wait()
        return proc.returncode


if __name__ == '__main__':
    import glob
    import os.path
    import sys

    ret = 0
    notebooks = set(glob.glob(os.path.join(NOTEBOOKS_DIR, '**/*.ipynb'), recursive=True))
    notebooks -= set(os.path.join(NOTEBOOKS_DIR, s)
                     for s in SKIP_NOTEBOOKS)
    for path in sorted(notebooks):
        ret = max(run_notebook(path), ret)
    sys.exit(ret)

@@ -33,16 +33,31 @@
 bprocess
+%0Aimport os.path
 %0A%0ANOTEBO
@@ -100,15 +100,30 @@
  = %5B
+os.path.join(
 'Bonus
-/
+','
 What
@@ -156,16 +156,17 @@
 g.ipynb'
+)
 %5D%0A%0A%0Adef 
@@ -594,27 +594,8 @@
 lob%0A
-    import os.path%0A
     
@@ -679,17 +679,20 @@
 DIR, '**
-/
+', '
 *.ipynb'

Use os.join for testing on multiple platforms.