Fix directory for last opened file not being found correctly.
Update string_to_enum to use unordered_map inited at the start of the program.
+ change processing of enums which are only part of the input datea.
Fix segfault on some files.