get the application name using app_name= in run_tests. If fail, use directory name. Closes #3296