Added optional output_dir parameter to build(), run() and build_run() methods, so that output test executable can be created in a different directory