Refs #8270 Add checking for valid working directory.
Merge branch 'bugfix/8270_bayes_dir_path_crash' into develop