Handle OSError when using subprocess.