Add watchdog for tests (30 seconds timeout), fix for out-of-source build and print last 15 lines of log, in case of error.