Catch `copytree` error on NFS drives (#4738). (#5150)
Catch `copytree` error on NFS drives (#4738). (#5150)

During build, `shutil.copytree` can throw an error when copying over the template directories even if the copy was successful. This only occurs when copying to + from an NFS drive (see https://bugs.python.org/issue24564). If this specific error is thrown (identified by "Errno 22" in the error string and a new templates directory having been generated), we catch it.
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab