Make sure some possible config paths are native strings.
refs #2452
Make sure no crash when current directory doesn't exist.
fix #2452
Move history plugin to learn phase.
Make sure PluginError.value is always a string. refs #2454