[execution][local] Improve error handling on algorithm execution

Currently, when an error occurred in one of the scripts, it
could just hang or the error itself wasn't properly processed.

This patch improves exception handling as well as error
message returned.
4 jobs for local_executor_improve_error_handling in 23 minutes and 12 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #174668
docker-build
build_linux_36

00:16:53

64.0%
passed #174669
docker-build
build_linux_37

00:16:59

64.0%
passed #174666
macosx
build_macosx_36

00:23:12

64.0%
passed #174667
macosx
build_macosx_37

00:23:10

64.0%