Added timeout to exec commands

This prevents a problem where the build hangs indefinitely because of a
dialog